package com.train.mgr.modules.biz.dto.request;

import com.train.mgr.modules.system.dto.request.groups.Insert;
import com.train.mgr.modules.system.dto.request.groups.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class LessonRoleReqDTO {

    @ApiModelProperty(name = "id", value = "id编辑时必填")
    @NotNull(message = "主键ID必填", groups = {Update.class})
    private Long id;
    /**
     * 角色名称
     */
    @ApiModelProperty(name = "roleName", value = "角色名称，新增/编辑时必填",required = true)
    @NotBlank(message = "角色名称必填", groups = {Insert.class, Update.class})
    @Length(max = 20, message = "角色名称必须在{max}个字以内", groups = {Insert.class, Update.class})
    private String roleName;

    /**
     * 角色定义
     */
    @ApiModelProperty(name = "roleDefinition", value = "角色定义必填")
    @NotBlank(message = "角色定义必填", groups = {Insert.class, Update.class})
    @Length(max = 500, message = "角色定义必须在{max}个字以内", groups = {Insert.class, Update.class})
    private String roleDefinition;

    /**
     * 性别（1：男；2：女）
     */
    @NotNull(message = "性别必填", groups = {Insert.class,Update.class})
    private Integer sex;

    /**
     * 背景信息
     */
    @ApiModelProperty(name = "backgroundInformation", value = "背景信息必填")
    @NotBlank(message = "背景信息必填", groups = {Insert.class, Update.class})
    private String backgroundInformation;
}
